//
// Created by heqian on 17-8-11.
//

#ifndef AUTOMAHJONG_MAHJONG_H
#define AUTOMAHJONG_MAHJONG_H


#include "../utils/Prt.h"
#include "../image/Image.h"
#include "Identify.h"


using namespace utils;
using namespace img;
using namespace std;

namespace mahjong {
    enum EnumLogin {
        NONE,
        MobileError,
        PassWordError,
    };

    class Callinterface {
    public:
        virtual void info(Prt<BoardInfo> &info);

        virtual bool simulateClick(int x, int y);
    };

    class Mahjong {
    public:
        Mahjong(Prt<Callinterface> &mCall);

        void discern(Prt<Image> img);

        EnumLogin login(string mobile, string pass);

        EnumLogin tokenLogin();

    protected:
        Identify mIdentify;
        Prt<Callinterface> mCall;
        string token;
    };

}
#endif //AUTOMAHJONG_MAHJONG_H
